A communication method that provides a first communication mode (infrastructure mode), in which wireless communication is performed between terminals via a master station, and a second communication mode (ad-hoc mode), in which data is sent and received directly between terminals, is defined by the IEEE 802.11 standard.
In the IEEE 802.11 standard, the frequency band utilized in communication is divided into 14 channels to thereby define a plurality of channels. Wireless communication terminals that utilize a common channel are capable of communicating with each other. An SSID (Service Set ID), which is an identifier for identifying the network, is specified. All wireless communication terminals retain a predetermined SSID and thus can identify the network.
A communication terminal that performs wireless communication in accordance with IEEE 802.11 (this terminal will be referred to simply as a “wireless communication terminal” below) transmits a beacon frame at prescribed timing. The beacon frame includes a channel ID that indicates the channel currently operating, the SSID of the network to which the apparatus belongs, and the communication mode. By passive or active scanning, a wireless communication terminal finds a wireless communication terminal with which it is to communicate. In passive scanning, for example, a beacon frame that includes an SSID identical with the terminal's own SSID is searched for by scanning the radio signal of each channel. A wireless communication terminal that has received the applicable beacon frame decides upon the channel that corresponds to the channel identifier contained in this beacon frame, or the channel that received this beacon frame, as the channel used in its own communication.
In active scanning, on the other hand, a wireless communication terminal broadcasts a frame, which is referred to as a “probe request”, on each channel. In response, another wireless communication terminal that has received the probe request transmits a frame, which is referred to as a “probe response”, to the wireless communication terminal that is the source of the probe request. The probe response includes the ID of the channel currently operating on the wireless communication terminal, the SSID and the communication mode. The wireless communication terminal that has received the probe response decides upon the channel that corresponds to the channel identifier contained in the probe response included in the SSID identical with that of this wireless communication terminal, or the channel that received the probe response, as the channel used in its own communication.
An autonomous distributed coordination method referred to as CSMA/CA and a centralized control method referred to as polling have been specified as access control methods in the infrastructure mode according to IEEE 802.11. On the other hand, in the ad-hoc mode, the access control method is such that only the autonomous distributed coordination method is specified. Owing to distributed control in the ad-hoc mode, data is sent and received directly between terminals. Among all terminals participating in communication at beacon transmission time decided by the beacon interval, at least one terminal transmits a beacon frame in the ad-hoc mode.
In the ad-hoc mode, a communication link is established between terminals if the channels used in communication between the terminal become the same, without the sending and receiving of an authentication frame and without the sending and receiving of an association request/association response.
Many methods of switching between the infrastructure mode and ad-hoc mode have been proposed heretofore. A method of changing over the mode when the processing capability of an access point no longer has any leeway is described in the specification of Japanese Patent Application Laid-Open No. 08-307934. The specification of Japanese Patent Application Laid-Open No. 11-252114 describes a method in which each station (wireless communication terminal) retains a list of stations capable of transferring data in the ad-hoc mode, with data being transmitted in the ad-hoc to stations in the list and in the infrastructure mode to stations not in the list. A method of changing over the access point depending upon the data rate of a mobile terminal is described in the specification of Japanese Patent Application Laid-Open No. 2000-209234. A method of changing over the access point in accordance with load information contained in a beacon is described in the specification of Japanese Patent Application Laid-Open No. 2001-298467. A method of changing over mode using the average frame size of a data frame as a trigger is described in the specification of Japanese Patent Application Laid-Open No. 2003-198564. A method of monitoring data reception in both communication modes and performing communication in the mode in which data was received is described in the specification of Japanese Patent Application Laid-Open No. 2002-199461.
Further, a method of changing an interval at which beacon scanning is performed has been proposed as a method of searching efficiently for a terminal to which a connection is to be made (see the specification of Japanese Patent Application Laid-Open No. 10-084572). However, this specification makes no mention of changeover of the communication mode.
In order for a user of a wireless communication terminal compliant with IEEE 802.11 to connect this terminal to the Internet, the access point is connected to the Internet in advance. The wireless communication terminal is connected to the network in the infrastructure mode.
In a network of this kind, a first wireless communication terminal that belongs to the same network (same service set) attempts to transmit data to a second wireless communication terminal that is performing communication in the infrastructure mode. In this case, the access point receives the data from the first wireless communication terminal temporarily and re-transmits it to the second wireless communication terminal. As a consequence, the sending and receiving of data takes time. Since both the first wireless communication terminal and the second wireless communication terminal can be connected to the Internet via access points, sufficient security measures must be taken with regard to illegal penetration from the Internet and leakage of information to the Internet.
Accordingly, performing communication upon changing over to the ad-hoc mode by a method of the kind illustrated in the prior art even in a case where communication is being performed in the infrastructure mode has been considered.
However, even if data can be sent and received in a link layer, the sending and receiving of meaningful data cannot be performed upon changing over the communication mode from the infrastructure mode to the ad-hoc mode unless there is data interchangeability with higher layers, namely the IP layer, transport layer or application layer.